import type { App } from 'vue'

const files = require.context('./', true, /\.ts$/)

const registers = files
    .keys()
    .filter((path) => !path.includes('index'))
    .map((path) => files(path).default)

export default (app: App) => {
    registers.forEach(register => {
        register(app)
    })
}
